\(\int (d+e x)^2 \sqrt {a+b \log (c x^n)} \, dx\) [125]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [F(-2)]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 22, antiderivative size = 298 \[ \int (d+e x)^2 \sqrt {a+b \log \left (c x^n\right )} \, dx=-\frac {1}{2} \sqrt {b} d^2 e^{-\frac {a}{b n}} \sqrt {n} \sqrt {\pi } x \left (c x^n\right )^{-1/n} \text {erfi}\left (\frac {\sqrt {a+b \log \left (c x^n\right )}}{\sqrt {b} \sqrt {n}}\right )-\frac {1}{2} \sqrt {b} d e e^{-\frac {2 a}{b n}} \sqrt {n} \sqrt {\frac {\pi }{2}} x^2 \left (c x^n\right )^{-2/n} \text {erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c x^n\right )}}{\sqrt {b} \sqrt {n}}\right )-\frac {1}{6} \sqrt {b} e^2 e^{-\frac {3 a}{b n}} \sqrt {n} \sqrt {\frac {\pi }{3}} x^3 \left (c x^n\right )^{-3/n} \text {erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c x^n\right )}}{\sqrt {b} \sqrt {n}}\right )+d^2 x \sqrt {a+b \log \left (c x^n\right )}+d e x^2 \sqrt {a+b \log \left (c x^n\right )}+\frac {1}{3} e^2 x^3 \sqrt {a+b \log \left (c x^n\right )} \]

[Out]

-1/18*e^2*x^3*erfi(3^(1/2)*(a+b*ln(c*x^n))^(1/2)/b^(1/2)/n^(1/2))*b^(1/2)*n^(1/2)*3^(1/2)*Pi^(1/2)/exp(3*a/b/n
)/((c*x^n)^(3/n))-1/4*d*e*x^2*erfi(2^(1/2)*(a+b*ln(c*x^n))^(1/2)/b^(1/2)/n^(1/2))*b^(1/2)*n^(1/2)*2^(1/2)*Pi^(
1/2)/exp(2*a/b/n)/((c*x^n)^(2/n))-1/2*d^2*x*erfi((a+b*ln(c*x^n))^(1/2)/b^(1/2)/n^(1/2))*b^(1/2)*n^(1/2)*Pi^(1/
2)/exp(a/b/n)/((c*x^n)^(1/n))+d^2*x*(a+b*ln(c*x^n))^(1/2)+d*e*x^2*(a+b*ln(c*x^n))^(1/2)+1/3*e^2*x^3*(a+b*ln(c*
x^n))^(1/2)

Rubi [A] (verified)

Time = 0.35 (sec) , antiderivative size = 298, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.318, Rules used = {2367, 2333, 2337, 2211, 2235, 2342, 2347} \[ \int (d+e x)^2 \sqrt {a+b \log \left (c x^n\right )} \, dx=-\frac {1}{2} \sqrt {\pi } \sqrt {b} d^2 \sqrt {n} x e^{-\frac {a}{b n}} \left (c x^n\right )^{-1/n} \text {erfi}\left (\frac {\sqrt {a+b \log \left (c x^n\right )}}{\sqrt {b} \sqrt {n}}\right )+d^2 x \sqrt {a+b \log \left (c x^n\right )}-\frac {1}{2} \sqrt {\frac {\pi }{2}} \sqrt {b} d e \sqrt {n} x^2 e^{-\frac {2 a}{b n}} \left (c x^n\right )^{-2/n} \text {erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c x^n\right )}}{\sqrt {b} \sqrt {n}}\right )+d e x^2 \sqrt {a+b \log \left (c x^n\right )}-\frac {1}{6} \sqrt {\frac {\pi }{3}} \sqrt {b} e^2 \sqrt {n} x^3 e^{-\frac {3 a}{b n}} \left (c x^n\right )^{-3/n} \text {erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c x^n\right )}}{\sqrt {b} \sqrt {n}}\right )+\frac {1}{3} e^2 x^3 \sqrt {a+b \log \left (c x^n\right )} \]

[In]

Int[(d + e*x)^2*Sqrt[a + b*Log[c*x^n]],x]

[Out]

-1/2*(Sqrt[b]*d^2*Sqrt[n]*Sqrt[Pi]*x*Erfi[Sqrt[a + b*Log[c*x^n]]/(Sqrt[b]*Sqrt[n])])/(E^(a/(b*n))*(c*x^n)^n^(-
1)) - (Sqrt[b]*d*e*Sqrt[n]*Sqrt[Pi/2]*x^2*Erfi[(Sqrt[2]*Sqrt[a + b*Log[c*x^n]])/(Sqrt[b]*Sqrt[n])])/(2*E^((2*a
)/(b*n))*(c*x^n)^(2/n)) - (Sqrt[b]*e^2*Sqrt[n]*Sqrt[Pi/3]*x^3*Erfi[(Sqrt[3]*Sqrt[a + b*Log[c*x^n]])/(Sqrt[b]*S
qrt[n])])/(6*E^((3*a)/(b*n))*(c*x^n)^(3/n)) + d^2*x*Sqrt[a + b*Log[c*x^n]] + d*e*x^2*Sqrt[a + b*Log[c*x^n]] +
(e^2*x^3*Sqrt[a + b*Log[c*x^n]])/3

Rule 2211

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/Sqrt[(c_.) + (d_.)*(x_)], x_Symbol] :> Dist[2/d, Subst[Int[F^(g*(e - c*(
f/d)) + f*g*(x^2/d)), x], x, Sqrt[c + d*x]], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2235

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2
]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2333

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2337

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Dist[x/(n*(c*x^n)^(1/n)), Subst[Int[E^(x/n)*(a +
b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2342

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Lo
g[c*x^n])^p/(d*(m + 1))), x] - Dist[b*n*(p/(m + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2347

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Dist[(d*x)^(m + 1)/(d*n*(c*x^n
)^((m + 1)/n)), Subst[Int[E^(((m + 1)/n)*x)*(a + b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, d, m, n, p}
, x]

Rule 2367

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = Expand
Integrand[(a + b*Log[c*x^n])^p, (d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n, p, q, r}
, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[r]))

Rubi steps \begin{align*} \text {integral}& = \int \left (d^2 \sqrt {a+b \log \left (c x^n\right )}+2 d e x \sqrt {a+b \log \left (c x^n\right )}+e^2 x^2 \sqrt {a+b \log \left (c x^n\right )}\right ) \, dx \\ & = d^2 \int \sqrt {a+b \log \left (c x^n\right )} \, dx+(2 d e) \int x \sqrt {a+b \log \left (c x^n\right )} \, dx+e^2 \int x^2 \sqrt {a+b \log \left (c x^n\right )} \, dx \\ & = d^2 x \sqrt {a+b \log \left (c x^n\right )}+d e x^2 \sqrt {a+b \log \left (c x^n\right )}+\frac {1}{3} e^2 x^3 \sqrt {a+b \log \left (c x^n\right )}-\frac {1}{2} \left (b d^2 n\right ) \int \frac {1}{\sqrt {a+b \log \left (c x^n\right )}} \, dx-\frac {1}{2} (b d e n) \int \frac {x}{\sqrt {a+b \log \left (c x^n\right )}} \, dx-\frac {1}{6} \left (b e^2 n\right ) \int \frac {x^2}{\sqrt {a+b \log \left (c x^n\right )}} \, dx \\ & = d^2 x \sqrt {a+b \log \left (c x^n\right )}+d e x^2 \sqrt {a+b \log \left (c x^n\right )}+\frac {1}{3} e^2 x^3 \sqrt {a+b \log \left (c x^n\right )}-\frac {1}{6} \left (b e^2 x^3 \left (c x^n\right )^{-3/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {3 x}{n}}}{\sqrt {a+b x}} \, dx,x,\log \left (c x^n\right )\right )-\frac {1}{2} \left (b d e x^2 \left (c x^n\right )^{-2/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {2 x}{n}}}{\sqrt {a+b x}} \, dx,x,\log \left (c x^n\right )\right )-\frac {1}{2} \left (b d^2 x \left (c x^n\right )^{-1/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {x}{n}}}{\sqrt {a+b x}} \, dx,x,\log \left (c x^n\right )\right ) \\ & = d^2 x \sqrt {a+b \log \left (c x^n\right )}+d e x^2 \sqrt {a+b \log \left (c x^n\right )}+\frac {1}{3} e^2 x^3 \sqrt {a+b \log \left (c x^n\right )}-\frac {1}{3} \left (e^2 x^3 \left (c x^n\right )^{-3/n}\right ) \text {Subst}\left (\int e^{-\frac {3 a}{b n}+\frac {3 x^2}{b n}} \, dx,x,\sqrt {a+b \log \left (c x^n\right )}\right )-\left (d e x^2 \left (c x^n\right )^{-2/n}\right ) \text {Subst}\left (\int e^{-\frac {2 a}{b n}+\frac {2 x^2}{b n}} \, dx,x,\sqrt {a+b \log \left (c x^n\right )}\right )-\left (d^2 x \left (c x^n\right )^{-1/n}\right ) \text {Subst}\left (\int e^{-\frac {a}{b n}+\frac {x^2}{b n}} \, dx,x,\sqrt {a+b \log \left (c x^n\right )}\right ) \\ & = -\frac {1}{2} \sqrt {b} d^2 e^{-\frac {a}{b n}} \sqrt {n} \sqrt {\pi } x \left (c x^n\right )^{-1/n} \text {erfi}\left (\frac {\sqrt {a+b \log \left (c x^n\right )}}{\sqrt {b} \sqrt {n}}\right )-\frac {1}{2} \sqrt {b} d e e^{-\frac {2 a}{b n}} \sqrt {n} \sqrt {\frac {\pi }{2}} x^2 \left (c x^n\right )^{-2/n} \text {erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c x^n\right )}}{\sqrt {b} \sqrt {n}}\right )-\frac {1}{6} \sqrt {b} e^2 e^{-\frac {3 a}{b n}} \sqrt {n} \sqrt {\frac {\pi }{3}} x^3 \left (c x^n\right )^{-3/n} \text {erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c x^n\right )}}{\sqrt {b} \sqrt {n}}\right )+d^2 x \sqrt {a+b \log \left (c x^n\right )}+d e x^2 \sqrt {a+b \log \left (c x^n\right )}+\frac {1}{3} e^2 x^3 \sqrt {a+b \log \left (c x^n\right )} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.26 (sec) , antiderivative size = 287, normalized size of antiderivative = 0.96 \[ \int (d+e x)^2 \sqrt {a+b \log \left (c x^n\right )} \, dx=\frac {1}{36} x \left (-18 \sqrt {b} d^2 e^{-\frac {a}{b n}} \sqrt {n} \sqrt {\pi } \left (c x^n\right )^{-1/n} \text {erfi}\left (\frac {\sqrt {a+b \log \left (c x^n\right )}}{\sqrt {b} \sqrt {n}}\right )-9 \sqrt {b} d e e^{-\frac {2 a}{b n}} \sqrt {n} \sqrt {2 \pi } x \left (c x^n\right )^{-2/n} \text {erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c x^n\right )}}{\sqrt {b} \sqrt {n}}\right )-2 \sqrt {b} e^2 e^{-\frac {3 a}{b n}} \sqrt {n} \sqrt {3 \pi } x^2 \left (c x^n\right )^{-3/n} \text {erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c x^n\right )}}{\sqrt {b} \sqrt {n}}\right )+36 d^2 \sqrt {a+b \log \left (c x^n\right )}+36 d e x \sqrt {a+b \log \left (c x^n\right )}+12 e^2 x^2 \sqrt {a+b \log \left (c x^n\right )}\right ) \]

[In]

Integrate[(d + e*x)^2*Sqrt[a + b*Log[c*x^n]],x]

[Out]

(x*((-18*Sqrt[b]*d^2*Sqrt[n]*Sqrt[Pi]*Erfi[Sqrt[a + b*Log[c*x^n]]/(Sqrt[b]*Sqrt[n])])/(E^(a/(b*n))*(c*x^n)^n^(
-1)) - (9*Sqrt[b]*d*e*Sqrt[n]*Sqrt[2*Pi]*x*Erfi[(Sqrt[2]*Sqrt[a + b*Log[c*x^n]])/(Sqrt[b]*Sqrt[n])])/(E^((2*a)
/(b*n))*(c*x^n)^(2/n)) - (2*Sqrt[b]*e^2*Sqrt[n]*Sqrt[3*Pi]*x^2*Erfi[(Sqrt[3]*Sqrt[a + b*Log[c*x^n]])/(Sqrt[b]*
Sqrt[n])])/(E^((3*a)/(b*n))*(c*x^n)^(3/n)) + 36*d^2*Sqrt[a + b*Log[c*x^n]] + 36*d*e*x*Sqrt[a + b*Log[c*x^n]] +
 12*e^2*x^2*Sqrt[a + b*Log[c*x^n]]))/36

Maple [F]

\[\int \left (e x +d \right )^{2} \sqrt {a +b \ln \left (c \,x^{n}\right )}d x\]

[In]

int((e*x+d)^2*(a+b*ln(c*x^n))^(1/2),x)

[Out]

int((e*x+d)^2*(a+b*ln(c*x^n))^(1/2),x)

Fricas [F(-2)]

Exception generated. \[ \int (d+e x)^2 \sqrt {a+b \log \left (c x^n\right )} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^(1/2),x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (co
nstant residues)

Sympy [F]

\[ \int (d+e x)^2 \sqrt {a+b \log \left (c x^n\right )} \, dx=\int \sqrt {a + b \log {\left (c x^{n} \right )}} \left (d + e x\right )^{2}\, dx \]

[In]

integrate((e*x+d)**2*(a+b*ln(c*x**n))**(1/2),x)

[Out]

Integral(sqrt(a + b*log(c*x**n))*(d + e*x)**2, x)

Maxima [F]

\[ \int (d+e x)^2 \sqrt {a+b \log \left (c x^n\right )} \, dx=\int { {\left (e x + d\right )}^{2} \sqrt {b \log \left (c x^{n}\right ) + a} \,d x } \]

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^(1/2),x, algorithm="maxima")

[Out]

integrate((e*x + d)^2*sqrt(b*log(c*x^n) + a), x)

Giac [F]

\[ \int (d+e x)^2 \sqrt {a+b \log \left (c x^n\right )} \, dx=\int { {\left (e x + d\right )}^{2} \sqrt {b \log \left (c x^{n}\right ) + a} \,d x } \]

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^(1/2),x, algorithm="giac")

[Out]

integrate((e*x + d)^2*sqrt(b*log(c*x^n) + a), x)

Mupad [F(-1)]

Timed out. \[ \int (d+e x)^2 \sqrt {a+b \log \left (c x^n\right )} \, dx=\int \sqrt {a+b\,\ln \left (c\,x^n\right )}\,{\left (d+e\,x\right )}^2 \,d x \]

[In]

int((a + b*log(c*x^n))^(1/2)*(d + e*x)^2,x)

[Out]

int((a + b*log(c*x^n))^(1/2)*(d + e*x)^2, x)